package com.example.housingRentalSystem.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.sql.Date;

/**
 * @author 王硕
 */
@Data
@ApiModel("订单实体")
public class Order {
    @ApiModelProperty("订单ID")
    private Integer id;

    @ApiModelProperty("订单号")
    private String orderNumber;

    @ApiModelProperty("租客ID")
    private Integer customerId;

    @ApiModelProperty("房东ID")
    private Integer ownerId;

    @ApiModelProperty("房屋ID")
    private Integer houseId;

    @ApiModelProperty("订单状态：-2待签合同 -1待付款 0生效中 1已退租 2待审核")
    private Integer status;

    @ApiModelProperty("月租金")
    private Integer monthRent;

    @ApiModelProperty("租住天数")
    private Integer dayNum;

    @ApiModelProperty("总金额")
    private Integer totalAmount;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("开始日期")
    private Date startDate;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("结束日期")
    private Date endDate;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("退租原因")
    private String reason;

    @ApiModelProperty("拒绝原因")
    private String refusalReason;

    private User owner;
    private User customer;
    private House house;
}
